﻿<Application x:Class="WIAssistant.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WIAssistant="clr-namespace:WIAssistant"
    StartupUri="Main.xaml">
    <!--StartupUri="ManualMapping.xaml">-->
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>

                <ResourceDictionary Source="WPF Themes\BureauBlue.xaml"/>
                <!-- Set Aero theme (for WPF) -->
                <ResourceDictionary Source="/PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component/themes/aero.normalcolor.xaml" />
                
                <!-- Generic AvalonDock colors -->
                <ResourceDictionary Source="/AvalonDock;component/themes/aero.normalcolor.xaml"/>
                
            </ResourceDictionary.MergedDictionaries>

            <!--Data Templates for Mappings-->
            <DataTemplate DataType="{x:Type WIAssistant:DestinationField}">
                <ContentControl Margin="5" MinWidth="60" MinHeight="70" >
                    <Border BorderThickness="2" BorderBrush="{Binding ColorState}" CornerRadius="5">
                        <!--This text block seems un-needed.  But it allows the whole control to be dragged.  Without it only the border and the 
                        text can be used to drag the control.-->
                        <TextBlock>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <TextBlock FontWeight="Bold" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="10" Text="{Binding DestField.Name}"/>
                                <TextBlock Grid.Row="1" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="10" Text="{Binding DestField.FieldType}"/>
                            </Grid>
                        </TextBlock>
                    </Border>
                </ContentControl>
            </DataTemplate>

                       
            <DataTemplate DataType="{x:Type WIAssistant:SourceField}">
                <ContentControl Margin="5" MinWidth="60" MinHeight="70" >
                    <Border BorderThickness="2" BorderBrush="Black" CornerRadius="5">
                        <!--This text block seems un-needed.  But it allows the whole control to be dragged.  Without it only the border and the 
                        text can be used to drag the control.-->
                        <TextBlock>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <TextBlock FontWeight="Bold" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="10" Text="{Binding SrcField.Name}"/>
                                <TextBlock Grid.Row="1" TextWrapping="Wrap" HorizontalAlignment="Center" Margin="10" Text="{Binding SrcField.FieldType}"/>
                            </Grid>
                        </TextBlock>
                    </Border>
                </ContentControl>
            </DataTemplate>

        </ResourceDictionary>
        

        
    </Application.Resources>


</Application>
